<%--
 * edit.jsp
 *
 * Copyright (C) 2013 Universidad de Sevilla
 * 
 * The use of this project is hereby constrained to the conditions of the 
 * TDG Licence, a copy of which you may download from 
 * http://www.tdg-seville.info/License.html
 --%>

<%@page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>

<%@taglib prefix="jstl" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles"%>
<%@taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@taglib prefix="security"
	uri="http://www.springframework.org/security/tags"%>
<%@taglib prefix="display" uri="http://displaytag.sf.net"%>
<%@taglib prefix="acme" tagdir="/WEB-INF/tags"%>


<form:form action="${requestURI }" modelAttribute="registration">
	<form:hidden path="participant" />
	<form:hidden path="event" />
	<form:hidden path="id" />


	<acme:textbox code="registration.date" path="registrationDate"
		readonly="true" />


	<jstl:if test="${finished}">

		<acme:textbox code="registration.assessment.rate"
			path="assessment.rate" readonly="false" />
		<acme:textbox code="registration.assessment.comment"
			path="assessment.comment" readonly="false" />
		<acme:submit code="registration.update" name="save" />
	</jstl:if>

	<jstl:if test="${!finished}">
		<acme:textbox code="registration.assessment.rate"
			path="assessment.rate" readonly="true" />
		<acme:textbox code="registration.assessment.comment"
			path="assessment.comment" readonly="true" />

	</jstl:if>
	<jstl:if test="${!started}">
		<input type="submit" name="delete"
			value="<spring:message code="registration.cancelRegistration" />"
			onclick="return confirm('<spring:message code = "registration.confirm.delete"/>')" />
	</jstl:if>
	<acme:cancel code="registration.cancel" url="/welcome/index.do" />

</form:form>